package com.qiaofang.collectmanage.utils;

public class NetUtils {

    private NetUtils(){}

    public static String getDomain(String webSite)throws Exception{
        String host = "";
        try {
            java.net.URL url = new java.net.URL(webSite);
            // 获取主机名
            host = url.getHost();
        }catch (Exception e){
            throw e;
        }
        return  host;
    }
}
